home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / visulztn / saoimage / saoimage.lha / hfiles / imtool.h < prev    next >
C/C++ Source or Header  |  1991-05-02  |  3KB  |  69 lines

  1.  
  2.     /* template for IRAF list-format point cursor coordinate filename */
  3. #ifdef VMS
  4. #define    COORDFILE    "frame.%d_%d"
  5. #else
  6. #define    COORDFILE    "frame.%d.%d"
  7. #endif
  8.     /* template for world coordinate system file name */
  9. #define    WCSFILE        "imtool_%d.wcs"
  10. #define    SZ_WCSBUF    320    /* WCS text buffer size */
  11.     /* user's local frame buffer configurations */
  12. #define    FBCONFIG_1    ".imtoolrc"
  13.     /* system wide frame buffer configurations */
  14. #ifndef FBCONFIG_2
  15. #define    FBCONFIG_2    "/usr/local/lib/imtoolrc"
  16. #endif
  17.     /* two choices of system environment varibale names */
  18. #define    FBCONFIG_ENV1    "imtoolrc"
  19. #define    FBCONFIG_ENV2    "IMTOOLRC"
  20.     /* default values */
  21. #define    DEF_NCONFIG        1    /* number of f.b. configs */
  22. #define    DEF_NFRAMES        1    /* save memory; only one frame */
  23. #define    DEF_FRAME_WIDTH        512    /* 512 square frame */
  24. #define    DEF_FRAME_HEIGHT    512    /* 512 square frame */
  25.     /* range of display vazlues used by imtool */
  26. #define CMS_DATASTART    1    /* minimum data */
  27. #define CMS_DATAEND    200    /* value imtool uses as data maximum */
  28. #define CMS_DATARANGE    200    /* range of display values in imtool */
  29.     /* types of scaling algorithms used by images.tv.display */
  30. #define W_UNITARY    0    /* direct unscaled */
  31. #define W_LINEAR    1    /* linear but from given low to high */
  32. #define W_LOG        2    /* log from low to high */
  33.  
  34.     /* codes for the imtool packet (IIS) header */
  35. #define    MEMORY        001    /* packet with image data */
  36. #define    LUT        02    /* switch display buffer */
  37. #define    FEEDBACK    005    /* for imtool, do clear and fbconfig */
  38. #define    IMCURSOR    020    /* logical image cursor */
  39. #define    WCS        021    /* used to set WCS */
  40. #define    PACKED        0040000    /* bit indicates byte data (in tid) */
  41. #define    COMMAND        0100000    /* bit with LUT to set disp frame */
  42. #define    IIS_READ    0100000    /* tid w/ MEMORY to read back dsip buf */
  43. #define    IMC_SAMPLE    0040000    /* code for read cursor now */
  44. #define    IMT_FBCONFIG    077    /* mask for fbconfig num (in tid) */
  45.  
  46.  
  47. struct imtoolRec {
  48.   short tid;        /* Type of message identifier ("transfer id") */
  49.   short thingct;    /* Count appropriate to message type */
  50.   short subunit;    /* Intended target type (MEMORY,LUT,FEEDBACK,etc) */
  51.   short checksum;    /* Error check */
  52.   short x, y;        /* (y,x & 01777) are UL coordinates in MEMORY packet */
  53.   short z;        /* (z & 07777) is frame number in FEEDBACK & MEMORY */
  54.   short t;        /* ? */
  55. };
  56.  
  57.     /* maximum transfer size (pixels per packet) */
  58. #ifdef VMS
  59. #define SZ_FIFOBUF 8192
  60. #else
  61. #ifdef IRAF25
  62. #define SZ_FIFOBUF 4096
  63. #else
  64. #define SZ_FIFOBUF 4000        /* transfer size for FIFO i/o */
  65. #endif
  66. #endif
  67.                               
  68.                                                               
  69.